package RNA;

import org.neuroph.core.NeuralNetwork;

public class RNA_Teste2 {
	
	NeuralNetwork neuralN;
    /**
     * Cria um teste de rede neural
     */
    public RNA_Teste2() {
        neuralN = NeuralNetwork.load("MLP2.nnet");
    }

     /**
     * Testa a rede neural na etapa de treinamento
     */
    public double testarRedeNeuralTreinamento(double [] distanciasRefem){
    	neuralN.setInput(distanciasRefem);
    	neuralN.calculate();
    	double[] valorSaidaTeste = neuralN.getOutput();
    	System.out.println("Saida (prisioneiro):");
    	double saida=3;
    	for(double saidaTeste : valorSaidaTeste)
    	{
    		saida = Math.round(saidaTeste);
        	System.out.println(Math.round(saida));
    		
    	}	
    	return saida;
    }

    /*public void testarRedeNeuralTreinamento(){
    	double [] ois = {100,200,300,400};
    	neuralN.setInput(ois);
    	neuralN.calculate();
    	double[] valorSaidaTeste = neuralN.getOutput();
    	System.out.println("Saida (prisioneiro):");
    	double saida=3;
    	for(double saidaTeste : valorSaidaTeste)
    	{
    		saida = Math.round(saidaTeste);
        	System.out.println(Math.round(saida));
    		
    	}	
    }*/
}

